

		<div class="wellsearch well-sm" id="searchfield">
			<div class="col-xs-8 input-group">
			
			<!-- 简单查询第一组 -->
                @for(x in col){
				<div id="divinput${x.index!}">
                    @			if(x.type=="text"||x.type=="number"||x.type=="tel"||x.type=="email"||x.type=="url"||x.type=="qq"||x.type=="unionpay"||x.type=="credit"||x.type=="idcard"){
                    <input type="${x.type!'text'}" id="${x.index!}"  name="${x.index!}" value="${x.value!}" placeholder="请输入${x.name!}" class="form-control"/>
                    @			}
                    @			else if(x.type=="double"){
                    <input type="${x.type!'text'}"  name="${x.index!}" value="${x.value!}" placeholder="请输入${x.name!}" class="form-control" />
                    @			}
                    @			else if(func.like(x.type,"select_")){
                    @                var num=strutil.replace(x.type,"select_","");
                    <blade:select code="${num}" name="${x.index!}" value="${x.value!0}" type="dict"  placeholder="${x.placeholder!}" />
                    @			}
                    @			else if(x.type=="selectDept"){
                    <blade:select  name="${table!x.table}.${x.index!}" value="${x.value!0}" type="dept"   />
                    @			}
                    @			else if(x.type=="selectRole"){
                    <blade:select  name="${table!x.table}.${x.index!}" value="${x.value!0}" type="role"   />
                    @			}
                    @			else if(x.type=="selectUser"){
                    <blade:select  name="${table!x.table}.${x.index!}" value="${x.value!0}" type="user"   />
                    @			}
                    @ else if(x.type == "laydate" || x.type == "date"){
                    <blade:laydate id = "_${x.index!}" name = "${x.index!}" value = "${x.value!}" format = "${x.format!}" placeholder = "${x.placeholder!'请选择日期'}"/>
                    @ }
                    @			else if(func.like(x.type,"opentree")){
                    <blade:opentree x="${x}" />
                    @			}
                    @			else {
                    <input type="text"  name="${x.index!}"  value="${x.value!}" placeholder="请输入${x.name!}" class="form-control" />
                    @			}
				</div>
				<input type="hidden" id="hides1"/>

				<span class="input-group-btn"></span>
                @}

			<!-- 简单查询按钮 -->
				<div class="input-group-btn">
					<button class="btn btn-sx btn-white" id="gotoSearch">查询</button>
					<button class="btn btn-sx btn-white" id="gotoReset">重置</button>
				</div>
			</div>

		</div>


	<script type="text/javascript">
		var isAutoPage = true;
		$(function () {
		    $("#gotoSearch").bind("click", function () {

		        var filter = "";
		        if (typeof (_filter) != "undefined") {
		            filter = _filter;
		        }
		        var where = (BladeTool.isEmpty(filter)) ? "" : filter.replace("}", "");
                @for(x in col){
                    var key = "${x.index}";
                    var value = $("[name="+key+"]").val();
                    var count = ${xLP.index};
                    if (BladeTool.isNotEmpty(value)) {
                        if(count==1){
                            where += (BladeTool.isEmpty(filter) ? "{" : ",") + "\"" + key + "\":\"" + value + "\"";
                        }else{
                            where += (BladeTool.isEmpty(where) ? "{" : ",") + "\"" + key + "\":\"" + value + "\"";
                        }
                    }
                @}
		        if (BladeTool.isNotEmpty(where) && BladeTool.isEmpty(exwhere)) {
		            where += "}";
		        }
		        else if (BladeTool.isNotEmpty(where) && BladeTool.isNotEmpty(exwhere)) {
		            where += exwhere.replace("{", ",");
		        }
		        else {
		            where = BladeTool.format(exwhere);
		        }
		        where = BladeTool.isEmpty(where) ? "" : encodeURI(where);
                isAutoPage = (BladeTool.isEmpty(where) ? true : false);
		        var pageNum = $jqGrid.getGridParam('page');
		        $jqGrid.jqGrid("setGridParam", { postData: { where: where }, page: (isAutoPage) ? pageNum : 1 }).trigger("reloadGrid");
		    });

		    $("#gotoReset").bind("click", function () {
                @for(x in col){
                    var key = "${x.index}";
                    $("[name="+key+"]").val('');
                @}
		        btn_stage.bind(toolbar);
		        reloadGrid();
		    });
		});

		function resetInput(num) {
		    $("#divinput" + num).html("<input type=\"text\"  id=\"inputs" + num + "\" class=\"form-control\" style=\"margin-left:-3px;\"/>");
		}


	</script>